﻿using System;

namespace T.FAS.Runtime.ScheduleJob.SPI
{
    public class ScheduleJobInstanceStore
    {
        /// <summary>
        /// 标识
        /// </summary>
        public string ID { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; }
        /// <summary>
        /// 任务实例ID
        /// </summary>
        public string InstanceID { get; set; }
        /// <summary>
        /// 计划任务元数据ID
        /// </summary>
        public string ScheduleJobID { get; set; }
        /// <summary>
        /// 任务类型
        /// </summary>
        public Metadata.Entity.ScheduleJob.JobType ScheduleJobType { get; set; }
        /// <summary>
        /// 任务分组信息
        /// </summary>
        public string ScheduleJobGroup { get; set; }
        /// <summary>
        /// 任务运行参数
        /// </summary>
        public string ScheduleJobData { get; set; }
        /// <summary>
        /// 任务执行状态
        /// </summary>
        public JobExecuteState ScheduleJobExecuteState { get; set; }
        /// <summary>
        /// 任务执行结果
        /// </summary>
        public JobExecuteResult ScheduleJobExecuteResult { get; set; }
        /// <summary>
        /// 失败原因
        /// </summary>
        public string FailReason { get; set; }
        /// <summary>
        /// 任务发起人ID
        /// </summary>
        public string UserID { get; set; }
        /// <summary>
        /// 任务发起人名称
        /// </summary>
        public string UserName { get; set; }
        /// <summary>
        /// 任务执行启动时间
        /// </summary>
        public DateTime StartTime { get; set; }
        /// <summary>
        /// 任务执行结束时间
        /// </summary>
        public DateTime EndTime { get; set; }
        /// <summary>
        /// 触发器ID
        /// </summary>
        public string TriggerID { get; set; }
        /// <summary>
        /// 触发器类型
        /// </summary>
        public Metadata.Entity.ScheduleJob.TriggerType TriggerType { get; set; }
        /// <summary>
        /// Cron表达式
        /// </summary>
        public string CronExpression { get; set; }
        public string Ext1 { get; set; }
        public string Ext2 { get; set; }
        public string Ext3 { get; set; }
        public string Creator { get; set; }
        public DateTime CreateTime { get; set; }
        public string LastModifier { get; set; }
        public DateTime LastModifyTime { get; set; }
    }
}
